Current sensor

ABSTRACT

A current sensor is disclosed. The current sensor is substantially immune to stray fields due to the position and orientation of at least two magnetic field sensors and their respective axes of maximum sensitivity, as well as a total current sensor output that is a based on a difference of the individual magnetic field sensor outputs. The specific position and orientation of the magnetic field sensors allows for the current sensor to be smaller than known sensors of similar sensitivity.

FIELD OF THE INVENTION

The present invention relates in general to the field of currentsensors, and more in particular to magnetic current sensors.

BACKGROUND OF THE INVENTION

Different kinds of current sensors are known in the art, for example (1)current sensors using a shunt resistor, (2) using a current transformer,(3) or using a magnetic sensor.

In current sensors using a shunt resistor, a voltage is measured overthe shunt resistor, and the current value can be determined by dividingthe measured voltage value and the resistor value. A disadvantage ofthis type is that the measurement circuit is not electrically isolatedfrom the load. A current transformer includes primary and secondarycoils. While this type of current sensor provides galvanic separation,it is usually very bulky. Current sensors based on magnetic sensorsprovide both galvanic separation and can be very compact. A problem withthis kind of current sensor is that it is sensitive to an externaldisturbance field (also referred to as “strayfield”), unless explicitlycancelling such field.

US20170184635(A1) describes a magnetic current sensor comprising anelectrical conductor and a plurality of sensor elements arranged indifferential pairs. Multiple pairs are used to increase the dynamicrange of this current sensor.

There is always room for improvements or alternatives.

SUMMARY OF THE INVENTION

It is an object of embodiments of the present invention to provide amagnetic current sensor which is highly insensitive to an externaldisturbance field.

It is an object of embodiments of the present invention to provide amagnetic current sensor which is more compact.

It is an object of particular embodiments of the present invention toprovide a current sensor with an integrated electrical conductor whichis easier and/or cheaper to produce.

It is an object of particular embodiments of the present invention toprovide a current sensor which can more easily be mounted or aligned toan external electrical conductor.

It is an object of particular embodiments of the present invention toprovide a current sensor capable of measuring and providing the currentvalue to be measured, but also capable of measuring and providing anexternal disturbance field (if present).

It is an object of particular embodiments of the present invention toprovide a current sensor capable of measuring a relatively high current(e.g. a current of at least 30 Amperes).

These and other objects are accomplished by a current sensor accordingto embodiments of the present invention.

According to a first aspect, the present invention provides a currentsensor device for measuring an electrical current, the current sensordevice comprising: a substrate mounted at a predefined position withrespect to an electrical conductor and comprising or connected to afirst magnetic sensor and a second magnetic sensor; wherein theelectrical conductor has a symmetry plane along a major axis of theelectrical conductor, the symmetry plane oriented substantiallyperpendicular to the substrate; wherein the first magnetic sensor islocated at a first location spaced from the symmetry plane, and has afirst axis of maximum sensitivity, and is configured for providing afirst value indicative of a first magnetic field component induced bythe current to be measured at said first location; wherein the secondmagnetic sensor has a second axis of maximum sensitivity parallel to thefirst axis and to said symmetry plane, and wherein the second magneticsensor is located at a second location situated in the symmetry plane,and is configured for providing a second value indicative of an externaldisturbance field, if present; a processing circuit connected to thefirst magnetic sensor for obtaining the first value, and connected tothe second magnetic sensor for obtaining the second value, and adaptedfor determining the current to be measured at least based on adifference between the first value and the second value.

The processing circuit may be integrated on said substrate.

In other words, the first sensor location is situated “at a non-zerodistance from” the symmetry plane, whereas the second sensor location issituated “at zero distance from” the symmetry plane.

It is an advantage of calculating the current based on a differencebetween two sensors having parallel axes of maximum sensitivity, becausethis allows to determine the current in a manner which is substantiallystray field immune. It is an advantage of calculating the current basedon a weighted difference, because it additionally allows to compensatefor sensitivity-mismatch.

The present invention is partly based on the insight that, in order tomeasure the current in a manner which is insensitive to an externaldisturbance field, it is not absolutely necessary to align or positionthe two magnetic sensors symmetrically with respect to the centre lineof the conductor, but the common mode rejection also works if the twosensor elements are located and oriented as recited in claim 1. Thepresent invention is based on a second insight that it is possible toarrange one of the magnetic sensors such that it does not measure amagnetic field generated by the current. This is contrary to theclassical current sensor arrangements, where one always tries to measurethe magnetic field twice, in order to get a signal which is two timeshigher.

It is a major advantage of locating the second sensor in the symmetryplane, rather than at an opposite edge of the conductor, because itallows the size of the classical substrate to be reduced to only abouthalf of its size. For example, the substrate width can be chosen smallerthan the width of the conductor, for example only 60% to 90% thereof.This advantage should not be underestimated, because the cost of thesubstrate constitutes a significant portion of the total cost of thecurrent sensor. This is especially important in a highly competitivemarket, such as automotive.

It is an advantage that the present invention works for conductors withvarious cross sectional shapes (for example circular, elliptical,square, rectangular, trapezoidal, etc.) as long as the conductor has across section with a symmetry plane, over its entire length, or overonly a portion of its length.

In an embodiment, the current to be determined is based on a weighteddifference of the first value (v1) and the second value (v2), and therespective weight factors (A, B) are chosen such that a uniform externalmagnetic field is cancelled. The weight factors may for example bedetermined during a calibration test and stored in a non-volatilememory, and retrieved from the non-volatile memory during actual use.

In an embodiment, a first angle α defined by the first axis of maximumsensitivity and the first magnetic field vector B1 is an anglesubstantially different from 90° and substantially different from 270°;and a second angle β defined by the second axis of maximum sensitivityand the second magnetic field vector B2 is substantially equal to 90° orsubstantially equal to 270°.

For example, the first angle may be an angle in the range from 0° to 88°or from 92° to 268° or from 272° to 360°, or from 50° to 88°, or from272° to 310°, or from 50° to 85°, or from 275° to 310°.

The second angle may be an angle in the range from 89° to 91° or from269° to 271°.

In an embodiment, each of the first and second magnetic sensor comprisesat least one Horizontal Hall element, each having an axis of maximumsensitivity in a direction perpendicular to the substrate.

In an embodiment, the substrate has an area in the range from 1 to 7mm², or from 2 to 7 mm², or from 1 to 5 mm².

In an embodiment, the current sensor device is a packaged device (alsoknown as “semiconductor chip”), and the substrate is a semiconductorsubstrate (e.g. a silicon substrate) comprising said first and secondmagnetic sensor (preferably in the form of horizontal Hall plates), andthe electrical conductor is an internal electrical conductor. Such acurrent sensor device is typically referred to as an “integrated currentsensor” or a “current sensor with an integrated electrical conductor”.

It is a major advantage of integrating the electrical conductor, becauseit allows a highly accurate positioning of the substrate relative to theelectrical conductor, in contrast to a system comprising a currentsensor device which is mounted in the vicinity of an external electricalconductor, for example on a PCB (printed circuit boards). Thepositioning tolerances of an integrated current sensor are typically anorder of magnitude more accurate than positioning tolerances of a chipon a PCB, or on an electrical conductor. All other aspects remaining thesame, this means that a current sensor with an embedded electricalconductor has a much higher accuracy than a current sensor mounted to anexternal electrical conductor, unless additional measures are taken,such as a calibration test by the end customer in the application.

The current sensor device may be produced for example by: a) providingthe leadframe comprising the electrical conductor; b) optionallyproviding an insulating material on the electrical conductor; c)mounting a substrate on the electrical conductor or on the insulatingmaterial; d) electrically connecting the second leads and the substrate(e.g. by applying bond wires); e) overmolding the leadframe and thesubstrate.

In an embodiment the electrical conductor has a beam shaped conductorportion having a width of about 4.0±0.5 mm, and the substrate has a sizeof 2±0.5 mm by 3±0.5 mm.

In an embodiment, the electrical conductor is substantially beam shaped,or has a beam shaped conductor portion, and the electrical conductor hasan electrical resistance smaller than 0.30 mOhm, or smaller than 0.28mOhm, or smaller than 0.26 mOhm.

In an embodiment, the electrical conductor has a planar beam shape witha constant width extending from one end of the chip package to theopposite end of the chip package, spanning the entire distance betweenthe input leads and output leads.

It is an advantage that the electrical resistance is smaller than 0.30mOhm, because it allows the current sensor device to conduct a currentof at least 30 Amperes through the (integrated) electrical conductor(with peak currents up to 100 Amps).

The “electrical conductor” may be formed as part of the leadframe and beformed between and connected to a plurality of first input leads andfirst output leads (not shown).

The first input leads and the first output leads may be located onopposite sides of the (typically rectangular) device package.

Preferably the beam shaped conductor portion extends over a majorportion of the electrical conductor.

It is an advantage of embodiments where the electrical conductor issubstantially beam shaped over a major portion of its length, e.g. overat least 70% or 80% of its length, because such a leadframe is easy toproduce (e.g. by stamping or etching), preferably without slits oropenings or zig-zag or the like. This is also advantageous formechanical stability, and thermal heat dissipation of the current sensordevice.

Preferably the conductor has a conductor portion with a constant crosssection in close vicinity of the first and second magnetic sensor.

In an embodiment, the electrical conductor is formed as part of theleadframe; and the leadframe is a copper leadframe having a thickness inthe range from 100 to 600 micron, or from 200 to 500 micron, e.g.substantially equal to 200 micron, or substantially equal to 250 micron.

It is not trivial to build a current sensor device capable of measuringa current of at least 30 Amps or at least 40 Amps or at least 50 Ampsusing an internal conductor formed as part of the leadframe with athickness in the range from 100 to 400 micron, or equal to about 200 orabout 250 micron, inter alia because the classical manner to reduce theelectrical conductance of an integrated conductor in current sensordevices is by increasing the thickness of the conductor while keepingthe width of the conductor unchanged, because otherwise, if the width isincreased and the thickness remains the same, the size of the substrateneeds to increase (and thus also the cost).

In an embodiment, a distance between a virtual line through the firstsensor location and perpendicular to the substrate and an edge of theelectrical conductor is less than 10% or less than 20% of a width We ordiameter Dc of the electrical conductor.

The magnetic field strength is typically relatively large near the edgeof the electrical conductor. Hence, in this embodiment, the signal v1 isrelatively large, thus providing both a good SNR, and at the same time arelatively small substrate size.

In an embodiment, a distance Δx between the first sensor location andthe second sensor location is a value in the range from 1.0 mm to 3.0mm, or in the range from 1.0 mm to 2.5 mm.

In an embodiment, the substrate has a first surface containing the firstand second magnetic sensor, and the first surface is facing theelectrical conductor; and the current sensor device further comprises anelectrical isolating material located between the substrate and theelectrical conductor. The electrical isolating material may be apolyamide layer as part of the semiconductor die (e.g. CMOS device), ormay be an electrically insulating tape applied between the leadframe andthe semiconductor die.

It is an advantage of this embodiment that the distance between themagnetic sensors and the electrical conductor is relatively small, andthat the signal measured by the sensors is relatively large (e.g. largerthan in case the second surface was facing the electrical conductor).This improves Signal-To-Noise ratio, and thus the accuracy of themeasurement.

In this embodiment, the substrate is preferably mechanically supportedat a first region or first end by the electrical conductor portion andthe isolation material.

The substrate may additionally be mechanically supported at an oppositeregion or opposite end, or may be left floating on the other end, with agap in between, which gap may be filled by air, or by a mold compound,or by insulation tape or another electrically isolating material (e.g. asuitable polymer).

In an embodiment, the substrate has a first surface containing the firstand second magnetic sensor, and the first surface is facing theelectrical conductor portion. The distance between the first surface andthe electrical conductor may be a value in the range from 150 to 250 μm,or in the range from 170 to 210 μm, for example equal to about 190micron.

In an embodiment, the electrical isolating material is adapted towithstand a voltage of at least 1000 Volt.

In an embodiment, the substrate has a first surface containing the firstand second magnetic sensor, and wherein the first surface is facing awayfrom the electrical conductor.

In this embodiment, an electrical insulating material is not absolutelyrequired between the electrical conductor portion and the substrate, butan electrical insulating material may optionally be present. Inembodiments without electrical insulating material, the substrate may bepositioned directly on top of the electrical conductor withoutadditional isolation material in between. This is easier to produce(requires less material and less handling), and thus is faster andcheaper to produce.

The distance between the first surface of the substrate and theelectrical conductor may be a value in the range from 300 to 400 μm, orin the range from 320 to 380 μm, for example equal to about 350 micron.

In embodiments where the substrate is separated from the electricalconductor portions by means of an electrically insulating tape, thedistance between the substrate and the electrical conductor portions maybe a value in the range from about 10 to 100 or from 15 to 100 or from20 to 100 or from 30 to 100 or from 30 to 80 or from 30 to 50 forexample equal to about 40 μm.

In an embodiment, the substrate further comprises a plurality of bondpads located on a portion of the substrate overlapping the electricalconductor, and the current sensor device further comprises a pluralityof bond wires interconnecting the plurality of bond pads with aplurality of leads.

In an embodiment, the bond pads are located only in a region of thesubstrate corresponding to a portion of the substrate which ismechanically supported underneath (i.e. is not left floating).

In an embodiment, the substrate further comprises a plurality of solderbumps connected to at least some of the leads, but galvanicallyseparated from the electrical conductor.

The galvanic separation may be implemented by a gap filled with air, ora gap filled with mold compound or a gap filled with an isolatingmaterial, e.g. an insulating tape, or the like.

In an embodiment, the electrical circuit comprises a differentialamplifier configured for determining and amplifying said differencebetween the first value and the second value.

In an embodiment, the electrical circuit comprises an amplifierconfigured for selectively amplifying the first value and the secondvalue, for example by means of a switch in front of the amplifier, andthe two amplified signals may be temporarily stored (e.g. on one or moresample and hold circuits) and then subtracted.

In an embodiment, the first sensor signal may be amplified by a firstamplifier, and the second sensor sensor may be amplified by a secondamplifier, and the two amplified values may be subtracted from oneanother.

In an embodiment, the current sensor device further comprises a digitalprocessor comprising or connected to a non-volatile memory storing atleast one constant value (e.g. a conversion factor), and wherein thedigital processor is adapted for determining the current to be measuredbased on a difference or a weighted difference between the first valueand the second value and based on said constant value.

The sensor device may further comprise an analog-to-digital convertorADC configured for digitizing the amplified difference signal (v1−v2),or for selectively digitizing the first amplified signal and the secondamplified signal. The ADC may be part of a digital processor, forexample a programmable microcontroller.

The current to be measured may be provided as an analog output signalproportional to the current, or may be provided as a digital signal,which may for example be output via a serial bitstream.

The digital processor may have an input connected to an output of thedifferential amplifier, in which case the digital processor may beadapted for digitizing the difference signal, and for multiplying thedigitized value by said constant value K, for example according to theformula: I=K.(ΔV), where ΔV is the digitized difference signal.

Alternatively, the subtraction may be performed in the digital domain.The digital processor may have an input connected to an output of theamplifier, and the digital processor may be adapted for selectivelydigitizing each of the first amplified signal and the second amplifiedsignal, to perform the subtraction in the digital domain, and tomultiply the result by said constant value K to obtain a result which isindicative of the current to be measured, for example according to theformula: I=K.(V1−V2), where V1 is a digitized value of the (optionallyamplified) first signal, and V2 is a digitized value of the (optionallyamplified) second signal.

In a variant, the digital processor may be adapted to calculate thecurrent using the formula:

I=(A.V1)−(B.V2), where “A” is a first amplification factor (analog ordigital) and “B” is a second amplification factor (analog or digital).This embodiment offers the advantage that it can correct for sensitivitymismatch. The value of A and B may be stored in a non-volatile memory,and may be determined during calibration, or in any other suitable way.

In an embodiment, the substrate further comprises at least onetemperature sensor configured for measuring at least one temperaturerelated to a temperature of the first magnetic sensor and/or the secondmagnetic sensor, the at least one temperature sensor being connected tothe digital processor; and wherein the digital processor is adapted forcalculating the current to be measured based on a difference or aweighted difference between the first value and the second value, andtaking into account the at least one measured temperature.

It is an advantage of this current sensor that it includes a temperaturecompensation mechanism. In this way, the accuracy of the currentmeasurement can be further improved.

In an embodiment, the substrate further comprises a first temperaturesensor and a second temperature sensor, the first temperature sensorbeing configured for measuring a first temperature (T1) of the firstmagnetic sensor, and the second temperature sensor being configured formeasuring a second temperature (T2) of the second magnetic sensor, thefirst temperature sensor and the second temperature sensor beingconnected to the digital processor; and the digital processor is adaptedfor calculating the current to be measured based on a difference or aweighted difference between the first value (v1) and the second value(v2), and taking into account the first temperature and the secondtemperature.

It is a major advantage of this embodiment that the temperature of eachmagnetic sensor is measured separately, because the temperature of thefirst and second magnetic sensor may be substantially different,especially if a relatively high current (e.g. larger than 30 Amps) isbeing measured, because such a high current typically causes theelectrical conductor to warm up significantly, causing a relativelylarge temperature gradient over the substrate. By measuring and takinginto account both temperatures, the accuracy of the current measurementcan be further improved. Moreover, the temperature sensor(s) may also beused to detect whether the device is working in its specifiedoperational range. If not, the sensor device may report an error, whicherror may be used for safety purposes.

In an embodiment, the first magnetic sensor comprises at least a firsthorizontal Hall element, and the first temperature sensor issubstantially surrounding the first horizontal Hall element, and thesecond magnetic sensor comprises at least a second horizontal Hallelement, and the second temperature sensor is substantially surroundingthe second horizontal Hall element.

The temperature sensor may be arranged around the horizontal Hallelements in a manner similar as described in patent documentEP3109658A1, with or without a stress sensor.

In an embodiment, the substrate further comprises at least one stresssensor configured for measuring at least one stress value related tomechanical stress experienced by the first magnetic sensor, the at leastone stress sensor being (e.g. communicatively) connected to the digitalprocessor; and the digital processor is adapted for calculating thecurrent to be measured based on a difference or weighted differencebetween the first magnetic value and the second magnetic value, andtaking into account the at least one measured stress value.

The stress sensor may be arranged around the horizontal Hall element ina manner similar as described in patent document EP3109658A1, butwithout a temperature sensor.

It is an advantage of this current sensor that it includes a stresscompensation mechanism. In this way, the accuracy of the currentmeasurement can be further improved.

In an embodiment, the substrate further comprises a first stress sensorand a second stress sensor, the first stress sensor being configured formeasuring a first stress at the first sensor location, and the secondstress sensor being configured for measuring a second stress at thesecond sensor location, the first stress sensor and the second stresssensor being connected to the digital processor, and the digitalprocessor is adapted for calculating the current to be measured based ona difference or a weighted difference between the first magnetic valueand the second magnetic value, and taking into account the first stressand the second stress.

It is a major advantage of this embodiment that the (mechanical) stressof each magnetic sensor is measured separately, because the stressexerted upon the first and the second magnetic sensor may besubstantially different, especially if a relatively high current (e.g.larger than 30 Amps) is being measured, because such a high currenttypically causes the electrical conductor to warm up significantly,causing a relatively large temperature gradient, causing mechanicalstress (related to different thermal expansion coefficients of thedifferent materials). In this way the accuracy of the currentmeasurement can be further improved.

In an embodiment, the substrate further comprises a first temperaturesensor and a first stress sensor surrounding the first magnetic sensor,and a second temperature sensor and a second stress sensor surroundingthe second magnetic sensor, the first temperature sensor and the firststress sensor and the second temperature sensor and the second stresssensor being (e.g. communicatively) connected to the digital processor;and wherein the digital processor is adapted for calculating the currentto be measured based on a difference between the first magnetic value(optionally amplified with or multiplied by a first factor A) and thesecond magnetic value (optionally amplified with or multiplied by asecond factor B), and taking into account the first and secondtemperature and the first and second stress, where the factors A and Bmay be chosen to compensate for sensitivity mismatch.

The temperature sensor and stress sensor may be arranged around thefirst and second magnetic sensor in a manner similar as described inpatent document EP3109658A1. In this way the accuracy of the currentmeasurement can be further improved.

In an embodiment, the current value determined by the processing circuitbased on the first and second magnetic sensor is considered as a firstcurrent value; and the substrate further comprises a third magneticsensor arranged in a similar manner as the first magnetic sensor andconfigured for measuring a third value, and further comprises a fourthmagnetic sensor arranged in a similar manner as the second magneticsensor and configured for measuring a fourth value; and the processingcircuit is further connected to the third magnetic sensor for obtainingthe third value, and to the fourth magnetic sensor for obtaining thefourth value, and is further adapted for determining a second currentvalue based on a difference or a weighted difference between the thirdvalue and the fourth value; and is further adapted for comparing thesecond current value and the first current value, and if a difference orratio between the first and second current value satisfies apredetermined condition, to provide an average of the first currentvalue and the second current value as the current value to be measured.Alternatively, either the first current value or the second currentvalue may be provided as “the” current value.

This embodiment may use four magnetic sensors for redundancy purposesand/or for “functional safety” purposes. In case the first and secondcurrent value are substantially the same, the average of these currentsis provided, which further improves the accuracy.

In case the first and second value deviate too much (e.g. more than apredefined value or more than a predefined percentage), the currentsensor device may provide an error signal, for example an analog errorsignal via one of the second leads, or a digital error value in a serialdata stream via one of the second leads.

According to a second aspect, the present invention also provides anassembly comprising: a current sensor device as described above withoutan internal electrical conductor; and an electrical conductor externalto the current sensor device.

According to a third aspect, the present invention also provides amethod of manufacturing a current sensor device with an internalelectrical conductor having a symmetry plane along its major axis, themethod comprising the steps of: a) providing a leadframe comprising anelectrical conductor portion adapted to carry the current to bemeasured, the electrical conductor portion having a symmetry plane alongits major axis; b) providing a substrate comprising or connected to atleast a first magnetic sensor and comprising or connected to a secondmagnetic sensor, the first magnetic sensor having a first axis ofmaximum sensitivity and adapted for providing a first signal, and thesecond magnetic sensor having a second axis of maximum sensitivityparallel to the first axis, and being adapted for providing a secondsignal; c) mounting the substrate relative to the leadframe such thatthe first magnetic sensor is located at a first location spaced from thesymmetry plane SP, and such that the first axis of maximum sensitivityis parallel to said symmetry plane SP, and such that the second sensoris situated in the symmetry plane; d) providing a processing circuitconnected to the first and second magnetic sensor, and adapted fordetermining the current to be measured at least based on a difference ora weighted difference of the first value and the second value.

The processing circuit may be embedded on the same substrate as thefirst magnetic sensor and/or the second magnetic sensor, in which casestep d) may be comprised in step b).

In an embodiment, step a) comprises: providing a copper leadframe havinga thickness in the range from 100 to 600 micron or from 200 to 500micron, said copper leadframe comprising a beam shaped conductor portionhaving an electrical resistance smaller than 0.30 mOhm or smaller than0.28 mOhm or smaller than 0.26 mOhm.

In an embodiment, the mounting of step c) is performed such that a firstangle α defined by the first axis of maximum sensitivity and the firstmagnetic field vector is an angle substantially different from 90° andsubstantially different from 270°, and such that a second angle βdefined by the second axis of maximum sensitivity and the secondmagnetic field vector is substantially equal to 90° or substantiallyequal to 270°.

In an embodiment, the mounting of step c) is performed such that adistance between a virtual line through the first sensor location andperpendicular to the substrate and an edge of the electrical conductoris less than 10% or less than 20% of a width or diameter of theelectrical conductor.

In an embodiment, step c) further comprises providing an electricalisolating material on the leadframe and mounting the substrate on saidelectrical isolating material.

In an embodiment, the method further comprises a step of overmouldingthe leadframe and the substrate to produce a packaged device.

Particular and preferred aspects of the invention are set out in theaccompanying independent and dependent claims. Features from thedependent claims may be combined with features of the independent claimsand with features of other dependent claims as appropriate and notmerely as explicitly set out in the claims.

These and other aspects of the invention will be apparent from andelucidated with reference to the embodiment(s) described hereinafter.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a block diagram of a current sensing apparatus, known inthe art.

FIG. 2(a) and FIG. 2(b) show an exemplary block diagram of a currentsensor device according to an embodiment of the present invention, intop view and in cross sectional view respectively.

FIG. 3(a) and FIG. 3(b) show an exemplary block diagram of a currentsensor device according to another embodiment of the present invention,in top view and in cross sectional view respectively.

FIG. 4(a) and FIG. 4(b) show an exemplary block diagram of a currentsensor device according to another embodiment of the present invention,in top view and in cross sectional view respectively.

FIG. 5 shows a set of characteristics and a set of formulas that can beused to determine the current in the sensor devices of FIG. 2 to FIG. 4.

FIG. 6 shows an exemplary block-diagram of an electrical circuit whichcan be used in embodiments of the present invention.

FIG. 7 shows an exemplary block-diagram of an electrical circuit whichcan be used in embodiments of the present invention.

FIG. 8 shows a flow chart of an exemplary method of producing a currentsensor according to embodiments of the present invention.

The drawings are only schematic and are non-limiting. In the drawings,the size of some of the elements may be exaggerated and not drawn onscale for illustrative purposes. Any reference signs in the claims shallnot be construed as limiting the scope. In the different drawings, thesame reference signs refer to the same or analogous elements.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

The present invention will be described with respect to particularembodiments and with reference to certain drawings, but the invention isnot limited thereto but only by the claims. The drawings described areonly schematic and are non-limiting. In the drawings, the size of someof the elements may be exaggerated and not drawn on scale forillustrative purposes. The dimensions and the relative dimensions do notcorrespond to actual reductions to practice of the invention.

Furthermore, the terms first, second and the like in the description andin the claims, are used for distinguishing between similar elements andnot necessarily for describing a sequence, either temporally, spatially,in ranking or in any other manner. It is to be understood that the termsso used are interchangeable under appropriate circumstances and that theembodiments of the invention described herein are capable of operationin other sequences than described or illustrated herein.

Moreover, the terms top, under and the like in the description and theclaims are used for descriptive purposes and not necessarily fordescribing relative positions. It is to be understood that the terms soused are interchangeable under appropriate circumstances and that theembodiments of the invention described herein are capable of operationin other orientations than described or illustrated herein.

It is to be noticed that the term “comprising”, used in the claims,should not be interpreted as being restricted to the means listedthereafter; it does not exclude other elements or steps. It is thus tobe interpreted as specifying the presence of the stated features,integers, steps or components as referred to, but does not preclude thepresence or addition of one or more other features, integers, steps orcomponents, or groups thereof. Thus, the scope of the expression “adevice comprising means A and B” should not be limited to devicesconsisting only of components A and B. It means that with respect to thepresent invention, the only relevant components of the device are A andB.

Reference throughout this specification to “one embodiment” or “anembodiment” means that a particular feature, structure or characteristicdescribed in connection with the embodiment is included in at least oneembodiment of the present invention. Thus, appearances of the phrases“in one embodiment” or “in an embodiment” in various places throughoutthis specification are not necessarily all referring to the sameembodiment but may. Furthermore, the particular features, structures orcharacteristics may be combined in any suitable manner, as would beapparent to one of ordinary skill in the art from this disclosure, inone or more embodiments.

Similarly, it should be appreciated that in the description of exemplaryembodiments of the invention, various features of the invention aresometimes grouped together in a single embodiment, figure, ordescription thereof for the purpose of streamlining the disclosure andaiding in the understanding of one or more of the various inventiveaspects. This method of disclosure, however, is not to be interpreted asreflecting an intention that the claimed invention requires morefeatures than are expressly recited in each claim. Rather, as thefollowing claims reflect, inventive aspects lie in less than allfeatures of a single foregoing disclosed embodiment. Thus, the claimsfollowing the detailed description are hereby expressly incorporatedinto this detailed description, with each claim standing on its own as aseparate embodiment of this invention.

Furthermore, while some embodiments described herein include some butnot other features included in other embodiments, combinations offeatures of different embodiments are meant to be within the scope ofthe invention, and form different embodiments, as would be understood bythose in the art. For example, in the following claims, any of theclaimed embodiments can be used in any combination.

In the description provided herein, numerous specific details are setforth. However, it is understood that embodiments of the invention maybe practiced without these specific details. In other instances,well-known methods, structures and techniques have not been shown indetail in order not to obscure an understanding of this description.

The term “magnetic sensor” as used herein may refer to one or moresensor elements capable of measuring one or more magnetic effects, suchas the Hall effect, or magnetoresistive (MR) effects. Non-limitingexamples for magnetoresistive effects include GMR (giantmagnetoresistance), CMR (colossal magnetoresistance), AMR (anisotropicmagnetoresistance) or TMR (tunneling magnetoresistance). Depending onthe context, the term “magnetic sensor” may refer to a single magneticsensitive element (e.g. a Horizontal Hall element or a Vertical Hallelement), or to a group of magnetic elements (e.g. arranged in aWheatstone bridge), or to a sub-circuit further comprising one or moreof: a biasing circuit, a readout circuit, an amplifier, anAnalog-to-Digital converter, etc.

The term “integrated current sensor” as used herein refers to anintegrated circuit (chip or IC) comprising an electrical conductorcapable of conducting the entire current to be measured. The electricalconductor is typically at least partially surrounded by a mold compound(e.g. in a manner wherein at most one surface is exposed).

When reference is made to “width of the electrical conductor”, what ismeant is “the local transverse dimension of the electrical conductor ateach point of the centerline in a plane perpendicular to the centerlineand parallel to the plane defined by the leadframe” unless clear fromthe context that something else is meant.

When reference is made to “weighted difference”, what is meant is adifference between two values after one or both of the values aremultiplied by a respective factor. In the context of the presentinvention, what is meant with “weighted difference of value V1 and valueV2” is a value V calculated as A*V1−B*V2, where A and B are predefinedconstants, V1 is the first value, and V2 is the second value.

The present invention relates to current sensors based on magneticsensors, also referred to as “magnetic current sensors”, as may be usedin automotive applications (e.g. for measuring a current in electricalor hybrid vehicles). The current sensors described below may be capableof measuring currents of at least 30 Ampere DC with peaks of up to 100Ampere or up to 120 Ampere.

FIG. 1 is based on FIG. 1 of US20170184635A1, and shows a block diagramof a current sensing apparatus 100, known in the art. The currentsensing apparatus comprises one or more pairs of magnetic sensorsarranged symmetrically with respect to a conductor 113, which carries acurrent to be measured. The current generates a magnetic field having anamplitude which increases with the current and decreases with distance.In the example shown in FIG. 1, a first pair of sensor elements 101 a,101 b is located at a first distance d1 from the conductor 113. Asdescribed in US20170184635A1, the signals from these sensor elements aresubtracted in the analogue domain using an operational amplifier toreduce the influence from an external disturbance field. The second pairof sensor elements 102 a, 102 b is located at a second distance d2 fromthe conductor 113, and also these signals are subtracted in the analoguedomain using an operational amplifier to reduce the influence from theexternal disturbance field. The processing circuit 130 determineswhether saturation occurs, and dependent on the outcome, determines thevalue of the current using the first differential signal from the firstpair or the second differential signal from the second pair, or acombination thereof.

The present invention proposes a current sensor device for measuring anelectrical current. The current sensor device comprising a substratemounted at a predefined position with respect to an electricalconductor. The electrical conductor has a conductor portion with asymmetry plane along its major axis, which is substantially parallel tothe direction in which the current will flow during operation. Theelectrical conductor may be internal (integrated inside the currentsensor device) or external (outside the current sensor device). Thesubstrate comprises or is connected to a first magnetic sensor andcomprises or is connected to a second magnetic sensor. The firstmagnetic sensor is located at a first location spaced from the symmetryplane, and has a first axis of maximum sensitivity, and is configuredfor providing a first value, indicative of a first magnetic fieldcomponent induced at said first location by the current to be measured.The second magnetic sensor has a second axis of maximum sensitivityparallel to the first axis and parallel to said symmetry plane, and thesecond magnetic sensor is located at a second location situated in thesymmetry plane, and is configured for providing a second value,indicative of an external disturbance field (if present). The currentsensor device further comprises a processing circuit connected to thefirst magnetic sensor for obtaining the first value. The processingcircuit is further connected to the second magnetic sensor for obtainingthe second value, and is adapted for determining the current to bemeasured at least based on a difference or a weighted difference betweenthe first value and the second value.

The processing circuit may also be integrated on said substrate.

It is not usual to provide a current sensor device with at least twomagnetic sensors arranged in such a way that one of the two sensors isincapable of measuring a magnetic field related to the current to bemeasured. Yet this arrangement is particularly beneficial for tworeasons: 1) to provide a current sensor device which is relativelyinsensitive to an external disturbance field, and 2) to provide acurrent sensor device having a relatively small substrate. The latterhas an important impact on the cost of the current sensor device, whichis very important in highly competitive markets, such as for exampleautomotive.

Referring now to the figures.

FIG. 1 is already described above.

FIG. 2(a) and FIG. 2(b) show an exemplary block diagram of a currentsensor device 200 according to an embodiment of the present invention,in top view and in cross sectional view respectively. Many aspects ofactual implementations are not illustrated, (such as for example aleadframe, leads or pins, bond wires, bond pads, insulating material,mold compound, etc.).

FIG. 2 shows a current sensor device 200 for measuring an electricalcurrent I which flows through an electrical conductor 213. Theelectrical conductor may be part of the current sensor device (referredto as: internal conductor or integrated conductor), or may be externalto the current sensor device. The current sensor device 200 comprises: asubstrate 210 mounted at a predefined position with respect to theelectrical conductor 213 and comprises a first magnetic sensor 211 and asecond magnetic sensor 212. Each magnetic sensor comprises at least onemagnetic sensitive element, for example at least one horizontal Hallelement. While not explicitly shown, each magnetic sensor may comprisemultiple horizontal Hall elements and/or biasing circuitry or excitationcircuitry and/or readout circuitry, and optionally further circuitry.The electrical conductor may be substantially planar, and may have anelongated shape with a beam shaped portion 214. The electrical conductor213 may have a relatively short or a relatively long beam shapedportion, or even an infinitesimal small beam-shaped conductor portion atthe sensor location. The electrical conductor or the beam shaped portionhas a symmetry plane Ω containing a centerline 216.

The first magnetic sensor 211 is located at a first location spaced fromthe symmetry plane Ω by a non-zero distance Δx, and has a first axis ofmaximum sensitivity (for example illustrated by a black arrow pointingupwards), and is configured for providing a first value v1 indicative ofa first magnetic field component (for example the out-of-plane fieldcomponent B1 z) induced by the current I when flowing through theelectrical conductor.

The second magnetic sensor 212 has a second axis of maximum sensitivity(also illustrated by a black arrow pointing upwards) parallel to thefirst axis, and is located at a second location situated on or in thesymmetry plane Ω, for example at an intersection of the symmetry planeand the substrate 210. The second magnetic sensor is configured forproviding a second value v2 indicative of an external disturbance field(if present), but not of the magnetic field induced by the current I.This is highly unusual, because in prior art current sensors, the twosensors are typically arranged so as to measure opposite values (whichare subtracted), or so as to measure a same value twice (which areadded), in order to double the signal value.

As far as is known to the inventors, there are no current sensors whichdeliberately position one of the sensor elements at this location whereno signal from the current conductor can be measured. Yet, by doing so,the dimensions of the substrate can be reduced by a factor of about two,while at the same time the influence from an external disturbance fieldcan be reduced. This insight is not known in the prior art. Instead, inprior art current sensors, the sensor elements are typically located atan equal distance from the centerline, maybe because it is falselybelieved that the sensor elements must not be located above or below theelectrical conductor in order to measure the disturbance field.

The current sensor device 200 further comprises a processing circuit610; 710 (not shown in FIG. 2, but see for example FIG. 6 and FIG. 7),which processing circuit is preferably integrated on the same substrate210 and which is connected to the first magnetic sensor 211 forobtaining the first value v1 (indicative of the magnetic field generatedby the current), and connected to the second magnetic sensor 212 forobtaining the second value v2 (not indicative of the current, but onlyindicative of an external magnetic field, if present). As will bedescribed further, the processing circuit is adapted for determining thecurrent at least based on a difference between the first value v1 andthe second value v2 or based on a weighted difference between the firstvalue v1 and the second value v2.

When a current to be measured flows through the electrical conductor213, more in particular through the beam shaped conductor portion 214, amagnetic field is generated which has a first magnetic field vector B1at the first sensor location, and which has a second magnetic fieldvector B2 at the second sensor location, as illustrated by the grayarrows.

As shown, the first axis of maximum sensitivity (black arrow) and thefirst magnetic field vector B1 (gray arrow) define a first angle α whichis substantially different from 90° and substantially different from270°. For example, the first angle α may be an angle in the range from0° to 88° or from 92° to 268° or from 272° to 360°, or from 50° to 88°,or from 272° to 310°, or from 50° to 85°, or from 275° to 310°.

The second axis of maximum sensitivity (black arrow) and the secondmagnetic field vector B2 (gray arrow) define a second angle β which issubstantially equal to 90° or substantially equal to 270°. For example,the second angle may be an angle in the range from 89° to 91° or from269° to 271°.

The electrical conductor 213 may be an internal conductor.

The electrical conductor 213 may have a beam shaped conductor portion214 having a width Wc in the range from 3.0 mm to 5.0 mm. The beamshaped conductor portion may extend over a portion of the full length ofthe electrical conductor (see FIG. 2), or may extend over the fulllength of the electrical conductor (see FIG. 3).

The electrical conductor may be formed as part of a leadframe. Such aleadframe (not shown) may comprise a plurality of first input leads anda plurality of first output leads interconnected by the electricalconductor and may further comprise a plurality of second leads (notshown) galvanically separated from the first leads. These second leadsmay be connected to bond pads (not shown) of the substrate, for exampleby means of bond wires (not shown).

The leadframe may be a copper leadframe having a thickness in the rangefrom 100 to 600 micron, or from 200 to 500 micron, e.g. substantiallyequal to 200 micron, or substantially equal to 250 micron.

The electrical conductor 213 may have an electrical resistance smallerthan 0.30 mOhm, or smaller than 0.28 mOhm, or smaller than 0.26 mOhm.This can be achieved for example by choosing a suitable leadframematerial (e.g. copper) and a suitable length Lc and width Wc andleadframe thickness. Thanks to this low resistance value, the powerdissipation caused by a current flowing through the electrical conductorcan be limited, thus the temperature increase can be limited.

The first sensor location may be situated at a position (on thesubstrate) substantially corresponding to an edge of the conductor, orsuch that a distance between a virtual line through the first sensorlocation and perpendicular to the substrate and an edge of theelectrical conductor is less than 10% or less than 20% of the width Wc(or diameter Dc) of the electrical conductor 213. Since the secondsensor location is situated at a position (on the substrate)substantially corresponding to a centerline 216 of the conductor, ratherthan the opposite edge of the conductor, the substrate size can bereduced by almost a factor of 2.

The distance Δx between the first sensor location and the second sensorlocation may for example be a value in the range from 1.0 mm to 3.0 mm,or in the range from 1.0 mm to 2.5 mm.

The substrate may have a width Ws smaller than the width Wc of the beamshaped conductor portion. For example, if the beam shaped conductorportion has a width Wc of 4.0 mm, the substrate may have a width Ws inthe range from 2.5 to 3.5 mm. The substrate may have an area in therange from 1 to 7 mm², or from 2 to 7 mm², or from 1 to 5 mm², forexample a size of 2±0.5 mm by 3±0.5 mm.

While not explicitly shown in FIG. 2, the substrate 210 may furthercomprise an electrical processing circuit. Examples of processingcircuitry will be shown in FIG. 6 and FIG. 7, but the invention is notlimited to these examples, and other processing circuits may also beused.

The substrate 210 has a first surface, also referred to as the activesurface containing the sensor elements and the processing circuit, and asecond surface opposite the first surface.

In the example of FIG. 2 the substrate 210 is located below theelectrical conductor 213, and the active surface of the substrate 210 isfacing the electrical conductor 213. An electrically insulating layer,e.g. an insulating polymer or an insulating tape (not shown) may beapplied between the substrate 210 and the electrical conductor 213.

Alternatively, the first surface of the substrate may be facing awayfrom the conductor. In this case the electrical conductor 213 may beseparated from the substrate by an insulating material (as describedabove) or may be placed directly on top of the substrate (or vice versa)without an additional insulating material in between. An oxide layer ora nitride layer may be provided on the second surface of the substrate,forming an electrical insulating layer.

The electrical isolating material may be adapted to withstand a voltageof at least 1000 Volt.

Instead of or in addition to bond wires, the substrate may also comprisea plurality of solder bumps (e.g. located on the second surface. Thesolder bumps may be electrically connected to elements or tracks orcomponents on the first surface by means of “through vias”. The solderbumps may rest upon and be connected to second leads, but the solderbumps are galvanically separated from the electrical conductor and fromthe first leads. The galvanic separation may be implemented by a gapfilled with air, or a gap filled with mold compound or a gap filled withan isolating material, e.g. an insulating tape, or in any suitablemanner.

FIG. 3(a) and FIG. 3(b) show an exemplary block diagram of a currentsensor device 300 according to another embodiment of the presentinvention, in top view and in cross sectional view respectively. Thecurrent sensor device 300 is a variant of the current sensor device 200of FIG. 2. The main difference between the current sensor device 300 ofFIG. 3 and the current sensor device 200 of FIG. 2 is that the beamshaped conductor portion 314 extends over substantially the entirelength of the electrical conductor 313. The current distribution in sucha conductor portion may be relatively uniform, and such a conductor(without slits) may be relatively easy to produce. Everything elsedescribed above for the current sensor device 200 of FIG. 2 andvariations thereof is also applicable here.

In a variant of FIG. 3(a), the electrical conductor is standing upright(vertically) rather than lying horizontally. Or stated in other words,its width We (in the X-direction) may be smaller than its thickness (inthe Z-direction).

FIG. 4(a) and FIG. 4(b) show an exemplary block diagram of a currentsensor device 400 according to another embodiment of the presentinvention, in top view and in cross sectional view respectively. Thecurrent sensor device 400 is a variant of the current sensor device 200of FIG. 2. The main differences between the current sensor device 400 ofFIG. 4 and the current sensor device 200 of FIG. 2 are: i) that theelectrical conductor does not have a beam shape, but a cylindricalshape. The same principles apply however, if the electrical conductorhas a symmetry plane S2; ii) that the electrical conductor may beexternal to the current conductor device. In the example shown in FIG.4, the substrate 410 is shown embedded in an exemplary plastic package.

FIG. 5 shows a set of characteristics and a set of formulas [1] to [7]that may be used to determine the current in the current sensor deviceof FIG. 2 to FIG. 4.

Formula [1] expresses that the value measured by the first magneticsensor is proportional to a Z-component of the total magnetic field atthe first sensor location.

Formula [2] expresses that the value measured by the second magneticsensor is proportional to a Z-component of the total magnetic field atthe second sensor location.

Formula [3] expresses that the Z-component of the total magnetic fieldat the first sensor location is the Z-component of the vector sum of anexternal disturbance field Bext and a projection of the induced magneticfield vector B1 in the direction of maximum sensitivity. The inducedfield can be written as a value proportional to the current.

Formula [4] expresses that the Z-component of the total magnetic fieldat the second sensor location is only equal to the Z-component of theexternal disturbance field (if present), because cos(β)=0.

By combining these formulas, the current to be measured can becalculated as the difference between the first and second value (v1−v2)divided by a constant K3, or as the difference between the first andsecond value (v1−v2) multiplied by a constant K4.

The constant K3 and K4 may be determined during the design phase orevaluation phase and be stored in a non-volatile memory of theprocessing circuit, or hard-coded in the processing algorithm. Ofcourse, the value of K3 or K4 may also be determined during acalibration test and stored in said non-volatile memory during thecalibration test, for later use.

As can be appreciated from formula [2] and formula [4], the value of theexternal field component Bextz, may also be calculated (if desired) asBextz=v2/S, S being the sensitivity of the second sensor which may be apredefined value, or determined during a calibration, and stored in anon-volatile memory.

As can be seen, formula [1] and formula [2] assume that the sensitivityof the first sensor and the second sensor is exactly the same, but inreality, the sensitivity may be slightly different. For example, thefirst sensor may measure a value v1=S1*Btot1 z, and the second sensormay measure a value v2=S2*Btot2 z. It can be shown that the current I tobe measured can be calculated by the following formula: I=K*(A*v1−B*v2),A, B and K are constants, which can be determined during a calibrationtest, and stored in a non-volatile memory. But other formulas may alsobe used, for example the following formula: I=(K1*v1−K2*v2) where K1 andK2 are constants, which can be determined during a calibration test, andstored in a non-volatile memory. The mathematical expressions(A*v1−B*v2) or (K1*v1−K2*v2) are referred to herein as “weighteddifference”.

FIG. 6 shows an electrical block-diagram of a circuit 610 that can beused in a current sensor device, e.g. as shown in FIG. 2 to FIG. 4, inthe absence of one or more temperature sensor(s) and one or more stresssensor(s), or at least not taking the values provided by them intoaccount. It is noted that the current conductor is omitted from thisdrawing, because it is galvanically separated from this processingcircuit 610, even though the electrical conductor is physically locatedin the vicinity of the first and second magnetic sensor 611, 621.

The processing unit 630 is adapted for determining the current to bemeasured in any known manner, for example using formula [6] or usingformula [7] of FIG. 5, or by calculating the current according to theformula: I=K.(v1−v2), where K is a predefined constant (e.g. determinedduring design or during an evaluation phase), v1 is the value providedby the first magnetic sensor 611 (or a value derived therefrom, e.g.after amplification), and v2 is the value provided by the secondmagnetic sensor 621. The subtraction may be done in hardware beforeamplification or after amplification or in the digital domain. Theprocessing unit 630 may comprise a digital processor comprising orconnected to a non-volatile memory 631 storing at least one constantvalue K.

While not explicitly shown, the processing circuit 610 may comprise adifferential amplifier configured for determining and amplifying adifference between the first value v1 and the second value v2, and foramplifying this difference in the analogue domain. Alternatively, theprocessing circuit 610 may comprise an amplifier configured forselectively amplifying the first value v1 and the second value v2. Thesensor device may further comprise an analog-to-digital convertor ADCconfigured for digitizing this amplified difference signal. The ADC maybe part of a digital processor circuit. The current to be measured maybe provided as an analog output signal proportional to the current ormay be provided as a digital signal indicative of the current to bemeasured. The second leads may be used to provide a supply voltage and aground signal to the processing circuit 610, and/or to provide a datainterface, for example a serial data bus (e.g. using the I2C protocol,or using RS232 protocol, or any other suitable protocol), and/or otherinput signals or output signals, as desired.

FIG. 7 shows an electrical block-diagram of a processing circuit 710which can be seen as a variant of the processing circuit 610 of FIG. 6,further comprising a first and a second temperature sensor 712, 722,communicatively connected to the processing unit 730. The processingunit 730 is adapted for determining the current to be measured based onthe values v1 and v2, but taking into account one or both of thetemperature signals t1, t2. The measured temperature(s) can be takeninto account for compensating the measurement values v1, v2 fortemperature variations, e.g. to compensate for sensitivity variations ofthe sensor elements. Such compensation techniques are known per sé inthe art, and hence need not be explained in more detail here. In aparticular embodiment, a temperature compensation is performed in amanner similar as described in EP3109658A1, which is incorporated hereinby reference in its entirety.

It is an advantage of this current sensor that it includes a temperaturecompensation mechanism. In this way, the accuracy of the currentmeasurement can be further improved.

The processing unit 630 of FIG. 6 and 730 of FIG. 7 may contain adigital processor, for example a programmable microcontroller. Althoughnot explicitly shown, the circuit 610 and 710 may also contain at leastone analog-to-digital convertor, which may be part of the magneticsensors, or may be part of the processing unit, or may be implemented asa separate circuit (e.g. between an output of the sensor circuit and aninput of the processing unit). The block diagram of FIG. 6 and FIG. 7does not show this level of detail, for the same reasons as it does notshow a biasing circuit, a readout circuit, an optional amplifier, apower supply, etc., which are all well known in the art, and hence neednot be described in detail here.

It is noted in this respect that if the signals v1, v2, t1 and t2 areanalog signals, the processing unit 730 may contain at least one ADC toconvert these signals into digital signals, whereas in case the signalsv1, v2, t1 and t2 are digital signals, the processing unit 730 need nothave an ADC.

It is an advantage of embodiments with two temperature sensors, one foreach magnetic sensor, because the temperature of the first and secondmagnetic sensor may be substantially different, especially if arelatively high current (e.g. larger than 30 Amps) is being measured,because such a high current typically causes the electrical conductor towarm up significantly, causing a relatively large temperature gradientover the substrate. In this way the accuracy of the current measurementcan be further improved.

In a variant (not shown) of FIG. 7, the circuit comprises only onetemperature sensor, which may be arranged for measuring the temperatureof the first magnetic sensor, or for measuring the temperature of thesecond magnetic sensor. The temperature of the other magnetic sensor maythen be estimated based on the estimated power dissipation (in turnbased on v1 and v2) and based on an predefined assumption of the ambienttemperature, instead of actually measuring the other temperature. Ofcourse, an embodiment with two temperature sensors is more accurate.

In a variant (not shown) of FIG. 7, the circuit comprises one or twostress sensors instead of one or two temperature sensors, and theprocessing unit 730 is adapted for determining the current based on thevalues obtained from the magnetic sensors, taking into account thestress value(s) obtained from one or both stress sensors.

In another variant (not shown) of FIG. 7, the circuit additionallycomprises one or two stress sensors in addition to one or twotemperature sensors, and the processing unit 730 is adapted fordetermining the current based on the values obtained from the magneticsensors and the one or more temperature sensors and the one or morestress sensors.

It is also contemplated to provide a current sensor device as shown inany of FIG. 2 to FIG. 4, where the substrate further comprises a thirdmagnetic sensor configured for measuring a third value v3, and furthercomprises a fourth magnetic sensor configured for measuring a fourthvalue v4. The third magnetic sensor may be arranged as a backup for thefirst magnetic sensor (e.g. having the same offset d1 and orientation),and the fourth magnetic sensor may be arranged as a backup for thesecond magnetic sensor (e.g. having the same offset d2 and orientation).The processing circuit may be adapted to calculate a first current valueI1 based on the first and second value v1, v2, and may be furtheradapted to calculate a second current value I2 based on the third andfourth value v3, v4. Both measurements are stray-field immune. The firstcurrent I1 and the second current I2 should ideally be the same, unlessthe current sensor is malfunctioning.

During use, the circuit can calculate the first and second current, andcalculate a difference I1−I2 or a ratio I1/I2, and if the difference issmaller than a predefined threshold, or if the ratio lies withinpredefined boundaries, the circuit can conclude that the measurementsare correct, and if the calculated difference or ratio lies outside saidboundaries, the circuit can conclude that the measurements areincorrect. If the circuit is designed such that the predefined value ofR is about equal to 1, then the circuit may provide the average of I1and I2 in case the measurement is correct. In this way, the SNR can befurther improved. The embodiment with four magnetic sensors can be usedfor redundancy and functional safety purposes.

FIG. 8 shows a flow chart of an exemplary method 800 of producing acurrent sensor with an integrated conductor portion. The methodcomprises the following steps:

-   -   a) providing 801 a leadframe comprising an electrical conductor        portion adapted to carry the current to be measured, the        electrical conductor portion having a symmetry plane along its        major axis;    -   b) providing 802 a substrate comprising or connected to at least        a first magnetic sensor and comprising or connected to a second        magnetic sensor, the first magnetic sensor having a first axis        of maximum sensitivity and adapted for providing a first signal        v1, and the second magnetic sensor having a second axis of        maximum sensitivity parallel to the first axis, and being        adapted for providing a second signal v2;    -   c) mounting 803 the substrate relative to the leadframe such        that the first magnetic sensor is located at a first location        spaced from the symmetry plane SP, and such that the first axis        of maximum sensitivity is parallel to said symmetry plane SP,        and such that the second sensor is situated in the symmetry        plane. This ensures that the first sensor is configured for        providing the first value indicative of the current to be        measured, and the second sensor is configured for providing the        second value indicative only of an external disturbance field        (if present), but not indicative of the current to be measured;    -   d) providing 804 a processing circuit connected to the first and        second magnetic sensor and adapted for determining the current I        to be measured at least based on a difference or a weighted        difference of the first value v1 and the second value v2.

While individual features are explained in different drawings anddifferent embodiments of the present invention, it is contemplated thatfeatures of different embodiments can be combined, as would be obviousto the skilled person, when reading this document.

The invention claimed is:
 1. A current sensor device for measuring anelectrical current, the current sensor device comprising: asemiconductor substrate mounted at a predefined position with respect toan electrical conductor and comprising a first magnetic sensor and asecond magnetic sensor, wherein each of the first and second magneticsensor comprises at least one Horizontal Hall element, each having anaxis of maximum sensitivity in a direction perpendicular to thesemiconductor substrate; wherein the electrical conductor has a symmetryplane along a major axis of the electrical conductor, the symmetry planeoriented substantially perpendicular to the semiconductor substrate;wherein the semiconductor substrate has a width (Ws) smaller than asmallest width (Wc) of the electrical conductor, measured in a directionperpendicular to the symmetry plane; wherein the first magnetic sensoris located at a first location, and has a first axis of maximumsensitivity parallel to said symmetry plane, and is configured forproviding a first value indicative of a first magnetic field componentmeasured at said first location; wherein the second magnetic sensor hasa second axis of maximum sensitivity parallel to the first axis, andwherein the second magnetic sensor is located at a second locationdifferent from the first location, and is configured for providing asecond value indicative of a second magnetic field component measured atsaid second location; a processing circuit integrated in thesemiconductor substrate, and connected to the first magnetic sensor forobtaining the first value, and connected to the second magnetic sensorfor obtaining the second value, and adapted for determining the currentto be measured at least based on a difference between the first valueand the second value.
 2. A current sensor device according to claim 1,wherein the width (Ws) of the semiconductor substrate is 60% to 90% ofthe smallest width (Wc) of the electrical conductor.
 3. A current sensordevice according to claim 1, wherein the electrical conductor has a beamshaped conductor portion having a width of about 4.0±0.5 mm, and thesemiconductor substrate has a width of 2±0.5 mm by 3±0.5 mm.
 4. Thecurrent sensor device according to claim 1, wherein a distance (Δx)between the first sensor location and the second sensor location is avalue in a range from 1.0 mm to 3.0 mm.
 5. The current sensor deviceaccording to claim 1, wherein the semiconductor substrate has an area ina range from 1 to 7 mm² or in a range from 2 to 7 mm², or in a rangefrom 1 to 5 mm².
 6. A current sensor device according to claim 1,wherein the current sensor device is a packaged device; and wherein theelectrical conductor is external to the packaged device.
 7. The currentsensor device according to claim 1, wherein a distance between a virtualline through the first sensor location and perpendicular to thesubstrate and an edge of the electrical conductor is less than 10% orless than 20% of a width or diameter of the electrical conductor.
 8. Thecurrent sensor device according to claim 1, wherein the semiconductorsubstrate has a first surface containing the first and second magneticsensor, and wherein the first surface is facing the electricalconductor; and wherein the current sensor device further comprises anelectrical isolating material located between the semiconductorsubstrate and the electrical conductor.
 9. The current sensor deviceaccording to claim 1, wherein the semiconductor substrate has a firstsurface containing the first and second magnetic sensor, and wherein thefirst surface is facing away from the electrical conductor.
 10. Thecurrent sensor device according to claim 1, wherein the electricalcircuit comprises a differential amplifier configured for determiningand amplifying said difference between the first value and the secondvalue, or wherein the electrical circuit comprises an amplifierconfigured for selectively amplifying the first value and the secondvalue; and/or wherein the current sensor device further comprises adigital processor comprising or connected to a non-volatile memorystoring at least one constant value, and wherein the digital processoris adapted for determining the current to be measured based on adifference or weighted difference between the first value and the secondvalue and based on said constant value.
 11. The current sensor deviceaccording to claim 10, wherein the semiconductor substrate furthercomprises at least one temperature sensor configured for measuring atleast one temperature related to a temperature of the first magneticsensor and/or the second magnetic sensor, the at least one temperaturesensor being connected to the digital processor; and wherein the digitalprocessor is adapted for calculating the current to be measured based ona difference between the first value and the second value, and takinginto account the at least one measured temperature.
 12. The currentsensor device according to claim 10, wherein the semiconductor substratefurther comprises at least one stress sensor configured for measuring atleast one stress value related to mechanical stress experienced by thefirst magnetic sensor, the at least one stress sensor being connected tothe digital processor; and wherein the digital processor is adapted forcalculating the current to be measured based on a difference between thefirst magnetic value and the second magnetic value, and taking intoaccount the at least one measured stress value.
 13. The current sensordevice according to claim 1, wherein the current value determined by theprocessing circuit based on the first and second magnetic sensor isconsidered as a first current value; and wherein the semiconductorsubstrate further comprises a third magnetic sensor arranged in asimilar manner as the first magnetic sensor and configured for measuringa third value, and further comprises a fourth magnetic sensor arrangedin a similar manner as the second magnetic sensor and configured formeasuring a fourth value; and wherein the processing circuit is furtherconnected to the third magnetic sensor for obtaining the third value andto the fourth magnetic sensor for obtaining the fourth value, and isfurther adapted for determining a second current value based on adifference between the third value and the fourth value, and is furtheradapted for comparing the second current value and the first currentvalue, and if a difference or ratio between the first and second currentvalue satisfies a predetermined condition, to provide an average of thefirst current value and the second current value as the current value.14. An assembly comprising: the current sensor device according to claim1; wherein the electrical conductor is external to the current sensordevice.